package com.atguigu.juc.day02.rw;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class Demo05ReadThenRead {

    public static void main(String[] args) {
        ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
        Lock readLock = readWriteLock.readLock();

        // 外层读锁
        readLock.lock();

        // 内层读锁
        readLock.lock();
    }

}
